package com.alibaba.nacos;

import com.alibaba.nacos.api.config.annotation.NacosValue;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class HelloController {

    @NacosValue("${user}")
    private String username;

    @GetMapping("/")
    @ResponseBody
    public String home() {
        return username;
    }
}
